package com.esun.rabbit2.viewer.mainact.lotteryhallact.sportteryfootballshengfu;


import com.esun.rabbit2.viewer.mainact.lotteryhallact.SportteryChooseActivity;
import com.esun.ui.R;

import android.os.Bundle;
import android.view.View;


/** 
* @ClassName: SportteryFootballShengfuChooseAct 
* @Description: 胜负彩 选择
* @author: Liujun liuj@500wan.com
* @date: 2012-4-27 下午3:55:25 
*  
*/
public class SportteryFootballShengfuChooseAct extends SportteryChooseActivity {

	public static int pageFlag = 0;
	
	/**
	 * @field:chooseListPage
	 * @description: 球类彩票的选择比赛界面(非Activity)
	 */
	private SportteryFootballShengfuChooseList chooseListPage;
	
	/**
	 * @field:buyLotteryPage
	 * @description: 球类彩票的购买界面(非Activity)
	 */
	
	private SportteryFootballShengfuBuyLottery buyLotteryPage;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		uiInIt();
	}

	/** 初始化 加载不同布局 */
	private void uiInIt() {

		View viewChooseList = this.getLayoutInflater().inflate(R.layout.sportteryfootballshengfu_choose_list, null);
		View viewBuyLottery = this.getLayoutInflater().inflate(R.layout.sportteryfootballshengfu_buy_lottery, null);


		chooseListPage = new SportteryFootballShengfuChooseList(this, viewChooseList);
		buyLotteryPage = new SportteryFootballShengfuBuyLottery(this, viewBuyLottery);

		chooseListPage.setSportteryBuyLotteryPage(buyLotteryPage);
		buyLotteryPage.setSportteryChooseListPage(chooseListPage);
	}

	@Override
	protected View getChooseListPageView() {
		return chooseListPage.getView();
	}

	@Override
	protected View getBuyLotteryPageView() {
		return buyLotteryPage.getView();
	}

	@Override
	public int getPageFlag() {
		return pageFlag;
	}

	@Override
	public void setPageFlag(int i) {
		pageFlag = i;
	}

	@Override
	public int getActiveCount() {
		return buyLotteryPage.getActiveItemNum();
	}

}
